﻿//-----------------------------------------------------------------------
// <copyright file="MLCollectionInfo.cs" company="MAPILab Ltd">
//     Copyright (c) MAPILab Ltd.  All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace MAPILab.SharePoint.Explorer.ObjectBrowser.TreeExpand
{
    using System.Collections;
    using System.ComponentModel;

    /// <summary>
    /// The object that contians in node, called "Collection Items"
    /// </summary>
    public class MLCollectionInfo
    {
        #region Fields

        /// <summary>
        /// Value indicating the number of objects in the collection
        /// </summary>
        private int itemsCount;

        /// <summary>
        /// Collection of items
        /// </summary>
        private IEnumerable enumerable;

        #endregion

        #region Poperties

        /// <summary>
        /// Gets and sets a value indicating the number of objects in the collection
        /// </summary>
        [Description("Gets and sets a value indicating the number of objects in the collection")]
        public int ItemsCount
        {
            get { return itemsCount; }
            set { itemsCount = value; }
        }

        /// <summary>
        /// Gets and sets collection of items
        /// </summary>
        public IEnumerable Enumerable
        {
            get { return enumerable; }
            set { enumerable = value; }
        }

        #endregion

        #region Constructor

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="itemsCount"></param>
        /// <param name="enumerable"></param>
        public MLCollectionInfo(int itemsCount, IEnumerable enumerable)
        {
            this.itemsCount = itemsCount;
            this.enumerable = enumerable;
        }

        #endregion
    }
}
